If you declare a variable outside a function, all the functions on your page can access it. The lifetime of these variables starts when they are declared, and ends when the page is closed
#Title: JavaScript Variables
#Element: 157: Lifetime of Variables When you declare a variable ...
#Article: 79: JavaScript Variables